<template>
  <div class="index listDet">
    <Header></Header>
    <div class="main">
        <p class="current-nav">
            当前位置 :
            <router-link to="index">首页</router-link>
            <i>></i>应急资讯
        </p>
      <div class="listDetMain">
          <div class="article">
              <h2>{{content.name}}</h2>
              <h5>发布日期：{{content.publishTime.split(' ')[0]}}</h5>
              <p v-html='content.description'></p>
          </div>
      </div>
    </div>
    <Footer></Footer>
  </div>
</template>

<script>
import config from "../../config.js";
import Header from '../common/header'
import Footer from '../common/footer'
export default {
  data () {
    return {
        content:{}
    }
  },
  components: {
    Header,
    Footer
  },
  mounted(){
  },
  methods:{
      getDetail() {
      this.$axios.get(config.baseUrl + 'emergency/v1.0/infomation/info/'+this.$route.query.id, { 
          }).then((res) => {
          // console.log(res)
          if (res.data.meta.success) {
            this.content = res.data.data
          } else {
           
          }

        }).catch((response) => {
          console.log(response);
        })
    },
  },
  created() {
    this.getDetail()
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang='less' scoped>
.listDet{
    .current-nav {
        float: left;
        width: 100%;
        height: 40px;
        line-height: 40px;
        padding-left: 30px;
        color: #939393;
        font-size: 14px;
        a{
            color: #939393;
            font-size: 14px;
        }
        i{  
            margin: 0 10px;
            font-style: normal;
        }
    }
    .listDetMain {   
        padding: 0 30px;
        background: #fff;
        width: calc(100% - 60px);
        margin: 40px auto 0;
        border-radius: 4px;
        .article{
            padding-top: 80px;
            padding-bottom: 40px;
            width: 80%;
            margin: 0 auto;
            h2{
                font-size: 18px;
                font-weight: bold;
                text-align: center;
            }
            h5{
                color: #999;
                font-size: 12px;
                text-align: center;
                margin: 20px 0 30px;
            }
            p{
                text-indent: 2em;
                line-height: 22px;
            }
        }
    }
}

</style>
